package com.cy.pojo;

/**
 * Created by PVer on 2017/7/18.
 */

import java.io.Serializable;

/**
 * 公告
 * {"name":name,"type_id":"1","source_url":self.url,"title":title,"content":content,"target_url":jumpUrl}
 * name 来自哪个网站 tpyeid 类型 sourceUrl 来源网站网址 title 标题 content 简略正文 targetUrl 正文跳转的地址
 */
public class Notice implements Serializable{
    private static final long serialVersionUID = -1959528436584592183L;

    /**
     * 交易所名称
     */
    private String name;
    /**
     * 类型
     */
    private String typeId;
    /**
     * 来源网站网址
     */
    private String sourceUrl;
    /**
     * 标题
     */
    private String title;
    /**
     * 简略正文
     */
    private String content;
    /**
     * 正文跳转的地址
     */
    private String targetUrl;
    /**
     * 时间
     */
    private String time;
    /**
     * 是否需要推送给未付费的
     */
    private boolean hasPushNotPay = true;

    private String sendTime;

    public String getSendTime() {
        return sendTime;
    }

    public void setSendTime(String sendTime) {
        this.sendTime = sendTime;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getTypeId() {
        return typeId;
    }

    public void setTypeId(String typeId) {
        this.typeId = typeId;
    }

    public String getSourceUrl() {
        return sourceUrl;
    }

    public void setSourceUrl(String sourceUrl) {
        this.sourceUrl = sourceUrl;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public String getTargetUrl() {
        return targetUrl;
    }

    public void setTargetUrl(String targetUrl) {
        this.targetUrl = targetUrl;
    }

    public String getTime() {
        return time;
    }

    public void setTime(String time) {
        this.time = time;
    }

    public boolean isHasPushNotPay() {
        return hasPushNotPay;
    }

    public void setHasPushNotPay(boolean hasPushNotPay) {
        this.hasPushNotPay = hasPushNotPay;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        Notice notice = (Notice) o;

        if (!title.equals(notice.title)) return false;
        return content.equals(notice.content);

    }

    @Override
    public int hashCode() {
        int result = title.hashCode();
        result = 31 * result + content.hashCode();
        return result;
    }
}
